/**
 * Created by Administrator on 2018/12/07/0007.
 */
imgUrl = 'http://192.168.2.64/plan/img/';
layui.use('upload',function(){
    upload = layui.upload;
    //开始部分上传
    upload.render({
        elem: '#one_img1' //绑定元素
        ,url: "/common/img" //上传接口
        ,data:{
            'path':'public/plan/img'
        }
        ,done: function(res){
            if(res.img){
                var imgs = $("input[name=one_img]").val().split(',');
                imgs[0] = res.img;
                $("input[name=one_img]").val(imgs.join(','));
                $("#one_upload_img1").css('display','block');
                $("#one_up_img1").attr('src',imgUrl+res.img);
            }else{
                layer.msg(res.error,{icon:5,time:2000});
                return;
            }
        }
    });
    //开始部分上传
    upload.render({
        elem: '#one_img2' //绑定元素
        ,url: "/common/img" //上传接口
        ,data:{
            'path':'public/plan/img'
        }
        ,done: function(res){
            if(res.img){
                var imgs = $("input[name=one_img]").val().split(',');
                imgs[1] = res.img;
                $("input[name=one_img]").val(imgs.join(','));
                $("#one_upload_img2").css('display','block');
                $("#one_up_img2").attr('src',imgUrl+res.img);
            }else{
                layer.msg(res.error,{icon:5,time:2000});
                return;
            }
        }
    });
    //开始部分上传
    upload.render({
        elem: '#one_img3' //绑定元素
        ,url: "/common/img" //上传接口
        ,data:{
            'path':'public/plan/img'
        }
        ,done: function(res){
            if(res.img){
                var imgs = $("input[name=one_img]").val().split(',');
                imgs[2] = res.img;
                $("input[name=one_img]").val(imgs.join(','));
                $("#one_upload_img3").css('display','block');
                $("#one_up_img3").attr('src',imgUrl+res.img);
            }else{
                layer.msg(res.error,{icon:5,time:2000});
                return;
            }
        }
    });
    //开始部分上传
    upload.render({
        elem: '#one_img4' //绑定元素
        ,url: "/common/img" //上传接口
        ,data:{
            'path':'public/plan/img'
        }
        ,done: function(res){
            if(res.img){
                var imgs = $("input[name=one_img]").val().split(',');
                imgs[3] = res.img;
                $("input[name=one_img]").val(imgs.join(','));
                $("#one_upload_img4").css('display','block');
                $("#one_up_img4").attr('src',imgUrl+res.img);
            }else{
                layer.msg(res.error,{icon:5,time:2000});
                return;
            }
        }
    });
    //准备部分上传
    upload.render({
        elem: '#two_img1' //绑定元素
        ,url: "/common/img" //上传接口
        ,data:{
            'path':'public/plan/img'
        }
        ,done: function(res){
            if(res.img){
                var imgs = $("input[name=two_img]").val().split(',');
                imgs[0] = res.img;
                $("input[name=two_img]").val(imgs.join(','));
                $("#two_upload_img1").css('display','block');
                $("#two_up_img1").attr('src',imgUrl+res.img);
            }else{
                layer.msg(res.error,{icon:5,time:2000});
                return;
            }
        }
    });
    //准备部分上传
    upload.render({
        elem: '#two_img2' //绑定元素
        ,url: "/common/img" //上传接口
        ,data:{
            'path':'public/plan/img'
        }
        ,done: function(res){
            if(res.img){
                var imgs = $("input[name=two_img]").val().split(',');
                imgs[1] = res.img;
                $("input[name=two_img]").val(imgs.join(','));
                $("#two_upload_img2").css('display','block');
                $("#two_up_img2").attr('src',imgUrl+res.img);
            }else{
                layer.msg(res.error,{icon:5,time:2000});
                return;
            }
        }
    });
    //准备部分上传
    upload.render({
        elem: '#two_img3' //绑定元素
        ,url: "/common/img" //上传接口
        ,data:{
            'path':'public/plan/img'
        }
        ,done: function(res){
            if(res.img){
                var imgs = $("input[name=two_img]").val().split(',');
                imgs[2] = res.img;
                $("input[name=two_img]").val(imgs.join(','));
                $("#two_upload_img3").css('display','block');
                $("#two_up_img3").attr('src',imgUrl+res.img);
            }else{
                layer.msg(res.error,{icon:5,time:2000});
                return;
            }
        }
    });
    //准备部分上传
    upload.render({
        elem: '#two_img4' //绑定元素
        ,url: "/common/img" //上传接口
        ,data:{
            'path':'public/plan/img'
        }
        ,done: function(res){
            if(res.img){
                var imgs = $("input[name=two_img]").val().split(',');
                imgs[3] = res.img;
                $("input[name=two_img]").val(imgs.join(','));
                $("#two_upload_img4").css('display','block');
                $("#two_up_img4").attr('src',imgUrl+res.img);
            }else{
                layer.msg(res.error,{icon:5,time:2000});
                return;
            }
        }
    });
    //基本部分上传(有可能多个)
    upload.render({
        elem: '#three_img1' //绑定元素
        ,url: "/common/img" //上传接口
        ,data:{
            'path':'public/plan/img'
        }
        ,done: function(res){
            if(res.img){
                var imgs = $("input[name=three_img]").val().split(',');
                imgs[0] = res.img;
                $("input[name=three_img]").val(imgs.join(','));
                $("#three_upload_img1").css('display','block');
                $("#three_up_img1").attr('src',imgUrl+res.img);
            }else{
                layer.msg(res.error,{icon:5,time:2000});
                return;
            }
        }
    });
    //基本部分上传(有可能多个)
    upload.render({
        elem: '#three_img2' //绑定元素
        ,url: "/common/img" //上传接口
        ,data:{
            'path':'public/plan/img'
        }
        ,size: 1024
        ,done: function(res){
            if(res.img){

                var imgs = $("input[name=three_img]").val().split(',');
                imgs[1] = res.img;
                $("input[name=three_img]").val(imgs.join());
                $("#three_upload_img2").css('display','block');
                console.log(imgUrl+res.img);
                $("#three_up_img2").attr('src',imgUrl+res.img);
            }else{
                layer.msg(res.error,{icon:5,time:2000});
                return;
            }
        }
    });
    //基本部分上传(有可能多个)
    upload.render({
        elem: '#three_img3' //绑定元素
        ,url: "/common/img" //上传接口
        ,data:{
            'path':'public/plan/img'
        }
        ,size: 1024
        ,done: function(res){
            if(res.img){
                var imgs = $("input[name=three_img]").val().split(',');
                imgs[2] = res.img;
                $("input[name=three_img]").val(imgs.join());
                $("#three_upload_img3").css('display','block');
                $("#three_up_img3").attr('src',imgUrl+res.img);
            }else{
                layer.msg(res.error,{icon:5,time:2000});
                return;
            }
        }
    });
    //基本部分上传(有可能多个)
    upload.render({
        elem: '#three_img4' //绑定元素
        ,url: "/common/img" //上传接口
        ,data:{
            'path':'public/plan/img'
        }
        ,size: 1024
        ,done: function(res){
            if(res.img){
                var imgs = $("input[name=three_img]").val().split(',');
                imgs[3] = res.img;
                $("input[name=three_img]").val(imgs.join());
                $("#three_upload_img4").css('display','block');
                $("#three_up_img4").attr('src',imgUrl+res.img);
            }else{
                layer.msg(res.error,{icon:5,time:2000});
                return;
            }
        }
    });
});
//div下添加元素
num = 1;
$("#add").click(function(){
    if($("input[name=edit]").val() == 1){
        var lengths = $("input[name=three_img]").val().split(',');
        if(lengths.length > num){
            num = lengths.length;
        }
        //num = lengths.length;
    }
    if (num > 3){
        layer.msg('不能添加了',{icon:5,time:2000});
        return;
    }
    num++;
    var info = "<div id='div_child"+num+"'>";
    info += "<div>";
    info += "<span title='删除' class='layui-icon layui-icon-delete' onclick='del_div("+num+")' style='font-size: 30px;color: red'></span>";
    info += "<div>";
    info +=     "<div class='layui-form-item layui-form-text'>";
    info +=     "<label class='layui-form-label'>教学名称</label>";
    info +=     "<div class='layui-input-block'>";
    info +=         "<textarea name='three_title[]' placeholder='教学名称' class='layui-textarea'></textarea>";
    info +=     "</div>";
    info += "</div>";
    info += "<div class='layui-form-item layui-form-text'>";
    info += "       <label class='layui-form-label'>教学内容</label>";
    info += "       <div class='layui-input-block'>";
    info += "            <textarea name='three_contents[]'placeholder='教学内容' class='layui-textarea'></textarea>";
    info += "        </div>";
    info += "    </div>";
    info += "   <div class='layui-form-item layui-form-text'>";
    info += "       <label class='layui-form-label'>教师活动</label>";
    info += "        <div class='layui-input-block'>";
    info += "           <textarea name='three_activity[]' placeholder='教师活动' class='layui-textarea'></textarea>";
    info += "       </div>";
    info += "   </div>";
    info += "    <div class='layui-form-item layui-form-text'>";
    info += "        <label class='layui-form-label'>学生活动</label>";
    info += "        <div class='layui-input-block'>";
    info += "           <textarea name='three_s_activity[]'  placeholder='学生活动' class='layui-textarea'></textarea>";
    info += "       </div>";
    info += "   </div>";
    info += "<div class='layui-form-item layui-form-text'>";
    info +=      "<label class='layui-form-label'>组织形式</label>";
    info +=         "<div class='layui-input-block'>";
    info +=           "<button type='button' class='layui-btn' id='three_img"+num+"'>";
    info +=               "<i class='layui-icon layui-icon-upload"+num+"'></i>上传图片";
    info +=           "</button>";
    info +=         "</div>";
    info +=     "<div class='layui-input-block'  id='three_upload_img"+num+"' style='display: none'>";
    info +=         "<img src='' width='100px' height='100px' id='three_up_img"+num+"'>";
    info +=     "</div>";
    info += "</div>";
    info += "</div>";
    info += "<div class='layui-form-item'>";
    info +=     "<label class='layui-form-label'>教学视频</label>";
    info +=     "<div class='layui-input-block'>";
    info +=        "<input type='text' name='three_video[]' placeholder='教学视频' autocomplete='off' class='layui-input'>";
    info +=    "</div>";
    info += "</div>";
    info += "</div>";
    info += "</div>";
    $("#info").append(info);
    uploads(num);
});
//移除某个div
function del_div(num){
    var images = $("input[name=three_img]").val().split(',');
    images.splice(num,1);
    images = images.join(',');
    $("input[name=three_img]").val(images);
    $("#div_child"+num).empty();
}
function uploads(num) {
    if(num == 1){
        upload.render({
            elem: '#three_img1' //绑定元素
            ,url: "/common/img" //上传接口
            ,data:{
                'path':'public/plan/img'
            }
            ,size: 1024
            ,done: function(res){
                if(res.img){
                    var imgs = $("input[name=three_img]").val().split(',');
                    imgs[0] = res.img;
                    $("input[name=three_img]").val(imgs.join(','));
                    $("#three_upload_img1").css('display','block');
                    $("#three_up_img1").attr('src',imgUrl+res.img);
                }else{
                    layer.msg(res.error,{icon:5,time:2000});
                    return;
                }
            }
        });
    }else if(num == 2){
        upload.render({
            elem: '#three_img2' //绑定元素
            ,url: "/common/img" //上传接口
            ,data:{
                'path':'public/plan/img'
            }
            ,size: 1024
            ,done: function(res){
                if(res.img){
                    var imgs = $("input[name=three_img]").val().split(',');
                    imgs[1] = res.img;
                    $("input[name=three_img]").val(imgs.join(','));
                    $("#three_upload_img2").css('display','block');
                    $("#three_up_img2").attr('src',imgUrl+res.img);
                }else{
                    layer.msg(res.error,{icon:5,time:2000});
                    return;
                }
            }
        });
    }else if(num == 3){
        upload.render({
            elem: '#three_img3' //绑定元素
            ,url: "/common/img" //上传接口
            ,data:{
                'path':'public/plan/img'
            }
            ,size: 1024
            ,done: function(res){
                if(res.img){
                    var imgs = $("input[name=three_img]").val().split(',');
                    imgs[2] = res.img;
                    $("input[name=three_img]").val(imgs.join());
                    $("#three_upload_img3").css('display','block');
                    $("#three_up_img3").attr('src',imgUrl+res.img);
                }else{
                    layer.msg(res.error,{icon:5,time:2000});
                    return;
                }
            }
        });
    }else{
        upload.render({
            elem: '#three_img4' //绑定元素
            ,url: "/common/img" //上传接口
            ,data:{
                'path':'public/plan/img'
            }
            ,size: 1024
            ,done: function(res){
                if(res.img){
                    var imgs = $("input[name=three_img]").val().split(',');
                    imgs[3] = res.img;
                    $("input[name=three_img]").val(imgs.join());
                    $("#three_upload_img4").css('display','block');
                    $("#three_up_img4").attr('src',imgUrl+res.img);
                }else{
                    layer.msg(res.error,{icon:5,time:2000});
                    return;
                }
            }
        });
    }
}

//------------------------------------------------------------------------------------------------------------------------
//开始部分
start_num = 1;
$("#add_start").click(function(){
    if($("input[name=edit]").val() == 1){
        var lengths = $("input[name=one_img]").val().split(',');
        if(lengths.length > start_num){
            start_num = lengths.length;
        }
        //num = lengths.length;
    }
    if (start_num > 3){
        layer.msg('不能添加了',{icon:5,time:2000});
        return;
    }
    start_num++;
    var info = "<div id='start_child_div"+start_num+"'>";
    info += "<div>";
    info += "<span title='删除' class='layui-icon layui-icon-delete' onclick='del_start_div("+start_num+")' style='font-size: 30px;color: red'></span>";
    info += "<div>";
    info +=     "<div class='layui-form-item layui-form-text'>";
    info +=     "<label class='layui-form-label'>教学名称</label>";
    info +=     "<div class='layui-input-block'>";
    info +=         "<textarea name='one_title[]' placeholder='教学名称' class='layui-textarea'></textarea>";
    info +=     "</div>";
    info += "</div>";
    info += "<div class='layui-form-item layui-form-text'>";
    info += "       <label class='layui-form-label'>教学内容</label>";
    info += "       <div class='layui-input-block'>";
    info += "            <textarea name='one_contents[]'placeholder='教学内容' class='layui-textarea'></textarea>";
    info += "        </div>";
    info += "    </div>";
    info += "   <div class='layui-form-item layui-form-text'>";
    info += "       <label class='layui-form-label'>教师活动</label>";
    info += "        <div class='layui-input-block'>";
    info += "           <textarea name='one_activity[]' placeholder='教师活动' class='layui-textarea'></textarea>";
    info += "       </div>";
    info += "   </div>";
    info += "    <div class='layui-form-item layui-form-text'>";
    info += "        <label class='layui-form-label'>学生活动</label>";
    info += "        <div class='layui-input-block'>";
    info += "           <textarea name='one_s_activity[]'placeholder='学生活动' class='layui-textarea'></textarea>";
    info += "       </div>";
    info += "   </div>";
    info += "<div class='layui-form-item layui-form-text'>";
    info +=      "<label class='layui-form-label'>组织形式</label>";
    info +=         "<div class='layui-input-block'>";
    info +=           "<button type='button' class='layui-btn' id='one_img"+start_num+"'>";
    info +=               "<i class='layui-icon layui-icon-upload"+start_num+"'></i>上传图片";
    info +=           "</button>";
    info +=         "</div>";
    info +=     "<div class='layui-input-block'  id='one_upload_img"+start_num+"' style='display: none'>";
    info +=         "<img src='' width='100px' height='100px' id='one_up_img"+start_num+"'>";
    info +=     "</div>";
    info += "</div>";
    info += "</div>";
    info += "<div class='layui-form-item'>";
    info +=     "<label class='layui-form-label'>教学视频</label>";
    info +=     "<div class='layui-input-block'>";
    info +=        "<input type='text' name='one_video[]' placeholder='教学视频' autocomplete='off' class='layui-input'>";
    info +=    "</div>";
    info += "</div>";
    info += "</div>";
    info += "</div>";
    $("#start_info").append(info);


    uploads_start(start_num);
});
function del_start_div (start_num){
    var images = $("input[name=one_img]").val().split(',');
    images.splice(start_num,1);
    images = images.join(',');
    $("input[name=one_img]").val(images);
    $("#start_child_div"+start_num).empty();
}
function uploads_start(start_num) {
    if(start_num == 1){
        upload.render({
            elem: '#one_img1' //绑定元素
            ,url: "/common/img" //上传接口
            ,data:{
                'path':'public/plan/img'
            }
            ,size: 1024
            ,done: function(res){
                if(res.img){
                    var imgs = $("input[name=one_img]").val().split(',');
                    imgs[0] = res.img;
                    $("input[name=one_img]").val(imgs.join(','));
                    $("#one_upload_img1").css('display','block');
                    $("#one_up_img1").attr('src',imgUrl+res.img);
                }else{
                    layer.msg(res.error,{icon:5,time:2000});
                    return;
                }
            }
        });
    }else if(start_num == 2){
        upload.render({
            elem: '#one_img2' //绑定元素
            ,url: "/common/img" //上传接口
            ,data:{
                'path':'public/plan/img'
            }
            ,size: 1024
            ,done: function(res){
                if(res.img){
                    var imgs = $("input[name=one_img]").val().split(',');
                    imgs[1] = res.img;
                    $("input[name=one_img]").val(imgs.join(','));
                    $("#one_upload_img2").css('display','block');
                    $("#one_up_img2").attr('src',imgUrl+res.img);
                }else{
                    layer.msg(res.error,{icon:5,time:2000});
                    return;
                }
            }
        });
    }else if(start_num == 3){
        upload.render({
            elem: '#one_img3' //绑定元素
            ,url: "/common/img" //上传接口
            ,data:{
                'path':'public/plan/img'
            }
            ,size: 1024
            ,done: function(res){
                if(res.img){
                    var imgs = $("input[name=one_img]").val().split(',');
                    imgs[2] = res.img;
                    $("input[name=one_img]").val(imgs.join(','));
                    $("#one_upload_img3").css('display','block');
                    $("#one_up_img3").attr('src',imgUrl+res.img);
                }else{
                    layer.msg(res.error,{icon:5,time:2000});
                    return;
                }
            }
        });
    }else{
        upload.render({
            elem: '#one_img4' //绑定元素
            ,url: "/common/img" //上传接口
            ,data:{
                'path':'public/plan/img'
            }
            ,size: 1024
            ,done: function(res){
                if(res.img){
                    var imgs = $("input[name=one_img]").val().split(',');
                    imgs[3] = res.img;
                    $("input[name=one_img]").val(imgs.join(','));
                    $("#one_upload_img4").css('display','block');
                    $("#one_up_img4").attr('src',imgUrl+res.img);
                }else{
                    layer.msg(res.error,{icon:5,time:2000});
                    return;
                }
            }
        });
    }
}
//-----------------------------------------------------------------------------------------------------------------------
//准备部分
ready_num = 1;
$("#add_ready").click(function(){
    if($("input[name=edit]").val() == 1){
        var lengths = $("input[name=two_img]").val().split(',');
        if(lengths.length > ready_num){
            ready_num = lengths.length;
        }
        //num = lengths.length;
    }
    if (ready_num > 3){
        layer.msg('不能添加了',{icon:5,time:2000});
        return;
    }
    ready_num++;
    var info = "<div id='ready_child_div"+ready_num+"'>";
    info += "<div>";
    info += "<span title='删除' class='layui-icon layui-icon-delete' onclick='del_ready_div("+ready_num+")' style='font-size: 30px;color: red'></span>";
    info += "<div>";
    info +=     "<div class='layui-form-item layui-form-text'>";
    info +=     "<label class='layui-form-label'>教学名称</label>";
    info +=     "<div class='layui-input-block'>";
    info +=         "<textarea name='two_title[]'  placeholder='教学名称' class='layui-textarea'></textarea>";
    info +=     "</div>";
    info += "</div>";
    info += "<div class='layui-form-item layui-form-text'>";
    info += "       <label class='layui-form-label'>教学内容</label>";
    info += "       <div class='layui-input-block'>";
    info += "            <textarea name='two_contents[]' placeholder='教学内容' class='layui-textarea'></textarea>";
    info += "        </div>";
    info += "    </div>";
    info += "   <div class='layui-form-item layui-form-text'>";
    info += "       <label class='layui-form-label'>教师活动</label>";
    info += "        <div class='layui-input-block'>";
    info += "           <textarea name='two_activity[]' placeholder='教师活动' class='layui-textarea'></textarea>";
    info += "       </div>";
    info += "   </div>";
    info += "    <div class='layui-form-item layui-form-text'>";
    info += "        <label class='layui-form-label'>学生活动</label>";
    info += "        <div class='layui-input-block'>";
    info += "           <textarea name='two_s_activity[]'placeholder='学生活动' class='layui-textarea'></textarea>";
    info += "       </div>";
    info += "   </div>";
    info += "<div class='layui-form-item layui-form-text'>";
    info +=      "<label class='layui-form-label'>组织形式</label>";
    info +=         "<div class='layui-input-block'>";
    info +=           "<button type='button' class='layui-btn' id='two_img"+ready_num+"'>";
    info +=               "<i class='layui-icon layui-icon-upload"+ready_num+"'></i>上传图片";
    info +=           "</button>";
    info +=         "</div>";
    info +=     "<div class='layui-input-block'  id='two_upload_img"+ready_num+"' style='display: none'>";
    info +=         "<img src='' width='100px' height='100px' id='two_up_img"+ready_num+"'>";
    info +=     "</div>";
    info += "</div>";
    info += "</div>";
    info += "<div class='layui-form-item'>";
    info +=     "<label class='layui-form-label'>教学视频</label>";
    info +=     "<div class='layui-input-block'>";
    info +=        "<input type='text' name='two_video[]' placeholder='教学视频' autocomplete='off' class='layui-input'>";
    info +=    "</div>";
    info += "</div>";
    info += "</div>";
    info += "</div>";
    $("#ready_info").append(info);


    uploads_ready(ready_num);
});
function del_ready_div (ready_num){
    var images = $("input[name=two_img]").val().split(',');
    images.splice(ready_num,1);
    images = images.join(',');
    $("input[name=two_img]").val(images);
    $("#ready_child_div"+ready_num).empty();
}
function uploads_ready(ready_num) {
    if(ready_num == 1){
        upload.render({
            elem: '#two_img1' //绑定元素
            ,url: "/common/img" //上传接口
            ,data:{
                'path':'public/plan/img'
            }
            ,size: 1024
            ,done: function(res){
                if(res.img){
                    var imgs = $("input[name=two_img]").val().split(',');
                    imgs[0] = res.img;
                    $("input[name=two_img]").val(imgs.join(','));
                    $("#two_upload_img1").css('display','block');
                    $("#two_up_img1").attr('src',imgUrl+res.img);
                }else{
                    layer.msg(res.error,{icon:5,time:2000});
                    return;
                }
            }
        });
    }else if(ready_num == 2){
        upload.render({
            elem: '#two_img2' //绑定元素
            ,url: "/common/img" //上传接口
            ,data:{
                'path':'public/plan/img'
            }
            ,size: 1024
            ,done: function(res){
                if(res.img){
                    var imgs = $("input[name=two_img]").val().split(',');
                    imgs[1] = res.img;
                    $("input[name=two_img]").val(imgs.join(','));
                    $("#two_upload_img2").css('display','block');
                    $("#two_up_img2").attr('src',imgUrl+res.img);
                }else{
                    layer.msg(res.error,{icon:5,time:2000});
                    return;
                }
            }
        });
    }else if(ready_num == 3){
        upload.render({
            elem: '#two_img3' //绑定元素
            ,url: "/common/img" //上传接口
            ,data:{
                'path':'public/plan/img'
            }
            ,size: 1024
            ,done: function(res){
                if(res.img){
                    var imgs = $("input[name=two_img]").val().split(',');
                    imgs[2] = res.img;
                    $("input[name=two_img]").val(imgs.join(','));
                    $("#two_upload_img3").css('display','block');
                    $("#two_up_img3").attr('src',imgUrl+res.img);
                }else{
                    layer.msg(res.error,{icon:5,time:2000});
                    return;
                }
            }
        });
    }else{
        upload.render({
            elem: '#two_img4' //绑定元素
            ,url: "/common/img" //上传接口
            ,data:{
                'path':'public/plan/img'
            }
            ,size: 1024
            ,done: function(res){
                if(res.img){
                    var imgs = $("input[name=two_img]").val().split(',');
                    imgs[3] = res.img;
                    $("input[name=two_img]").val(imgs.join(','));
                    $("#two_upload_img4").css('display','block');
                    $("#two_up_img4").attr('src',imgUrl+res.img);
                }else{
                    layer.msg(res.error,{icon:5,time:2000});
                    return;
                }
            }
        });
    }
}